home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / gnustuff / tos / bash / bash-110 / mintve~1 / bash110s.zoo / bash-1.10 / Makefile.MiNT < prev    next >
Encoding:
Makefile  |  1991-11-09  |  6.4 KB  |  188 lines

  1. # Hacked up Makefile for bash on the ST under MiNT
  2.  
  3. BISON=bison -y
  4. CC=gcc -traditional
  5.  
  6. MACHINE="Atari"
  7. OS=MiNT
  8.  
  9.  # This system has some peculiar flags that must be passed to the
  10.  # the C compiler (or to cpp).
  11. SYSDEP=-O -fomit-frame-pointer -fcombine-regs 
  12.  
  13.  # This system has the vprintf () and vfprintf () calls.
  14.  # Well, yes, but most Eunuchs systems use varargs (which is braindead)
  15. #VPRINTF=-DHAVE_VPRINTF
  16.  # This system has <unistd.h>.
  17. UNISTD=-DHAVE_UNISTD_H
  18.  # This system has <sys/resource.h>
  19. RESOURCE=-DHAVE_RESOURCE
  20.  # This systems signal () call returns a pointer to a function returning
  21.  # void.  The signal handlers themselves are thus void functions.
  22. SIGHANDLER=-DVOID_SIGHANDLER
  23.  # This system has the strerror () function.
  24. STRERROR=-DHAVE_STRERROR
  25.  # This system has <sys/wait.h>
  26. WAITH=-DHAVE_WAIT_H
  27.  # This system has the getwd () call.
  28. GETWD=-DHAVE_GETWD
  29.  # This system has a working version of dup2 ().
  30. DUP2=-DHAVE_DUP2
  31.  
  32. SYSTEM_FLAGS=$(LINEBUF) $(VPRINTF) $(UNISTD) $(GROUPS) $(RESOURCE) \
  33.     $(SIGHANDLER) $(SYSDEP) $(WAITH) $(GETWD) $(DUP2) $(STRERROR) \
  34.     -D$(MACHINE) -D$(OS)
  35. LDFLAGS=-s
  36. CFLAGS=$(DEBUG_FLAGS) $(SYSTEM_FLAGS) -DSHELL $(ALLOCA_CFLAGS)
  37. LDLIBS=-lreadline -lglob -ltermcap -liio
  38. CPPFLAGS=
  39.  
  40.  # These are required for sending bug reports.
  41. SYSTEM_NAME = $(MACHINE)
  42. OS_NAME = $(OS)
  43.  
  44.  # The name of this program.
  45. PROGRAM = bash
  46.  
  47.  # The type of machine Bash is being compiled on.
  48. HOSTTYPE_DECL = -DHOSTTYPE='$(SYSTEM_NAME)'
  49.  
  50.  # The default primary and secondary prompts.
  51. PPROMPT = '"\\u@\\h\\$$ "'
  52. SPROMPT = '"> "'
  53.  
  54. bash_maintainer =dpg@Cs.Nott.AC.UK
  55. MAINTAIN_DEFINE = -DMAINTAINER='"$(bash_maintainer)"'
  56.  
  57.  # The group of configuration flags.  These are for shell.c
  58. CFG_FLAGS = -DPPROMPT=$(PPROMPT) -DSPROMPT=$(SPROMPT) -DOS_NAME='"$(OS_NAME)"'        -DSYSTEM_NAME='$(SYSTEM_NAME)' $(SIGLIST_FLAG) $(MAINTAIN_DEFINE)
  59.  
  60. ALLOCA_DEFINE = -DHAVE_ALLOCA
  61. ALLOCA_CFLAGS = $(ALLOCA_DEFINE) $(ALLOCA_H_DEFINE)
  62.  
  63. RANLIB = echo
  64.  
  65. BUILTINS_LIB = builtins/builtins.a
  66.  
  67. OBJECTS=shell.o y.tab.o general.o make_cmd.o print_cmd.o $(GLOBO) \
  68.     dispose_cmd.o execute_cmd.o variables.o copy_cmd.o \
  69.     expr.o flags.o jobs.o subst.o hash.o mailcheck.o test.o \
  70.     trap.o alias.o $(MALLOC) $(ALLOCA) braces.o unwind_prot.o \
  71.     $(SIGLIST) version.o bashline.o $(BUILTINS_LIB)
  72.  
  73.  # Where the source code of the shell builtins resides.
  74. DEFDIR = builtins/
  75. BUILTIN_DEFS = $(DEFDIR)alias.def $(DEFDIR)bind.def $(DEFDIR)break.def \
  76.            $(DEFDIR)builtin.def $(DEFDIR)cd.def $(DEFDIR)colon.def \
  77.            $(DEFDIR)command.def $(DEFDIR)declare.def \
  78.            $(DEFDIR)echo.def $(DEFDIR)enable.def $(DEFDIR)eval.def \
  79.            $(DEFDIR)exec.def $(DEFDIR)exit.def $(DEFDIR)fc.def \
  80.            $(DEFDIR)fg_bg.def $(DEFDIR)hash.def $(DEFDIR)help.def \
  81.            $(DEFDIR)history.def $(DEFDIR)jobs.def $(DEFDIR)kill.def \
  82.            $(DEFDIR)let.def $(DEFDIR)read.def $(DEFDIR)return.def \
  83.            $(DEFDIR)set.def $(DEFDIR)setattr.def $(DEFDIR)shift.def \
  84.            $(DEFDIR)source.def $(DEFDIR)suspend.def $(DEFDIR)test.def \
  85.            $(DEFDIR)times.def $(DEFDIR)trap.def $(DEFDIR)type.def \
  86.            $(DEFDIR)ulimit.def $(DEFDIR)umask.def $(DEFDIR)wait.def \
  87.            $(DEFDIR)getopts.def $(DEFDIR)reserved.def
  88. BUILTIN_C_CODE  = $(DEFDIR)mkbuiltins.c $(DEFDIR)common.c \
  89.           $(DEFDIR)hashcom.h $(GETOPT_SOURCE)
  90. GETOPT_SOURCE   = $(DEFDIR)getopt.c $(DEFDIR)getopt.h
  91. PSIZE_SOURCE    = $(DEFDIR)psize.sh $(DEFDIR)psize.c
  92.  
  93. all: $(PROGRAM)
  94.  
  95. $(PROGRAM):  .build $(OBJECTS) $(LIBDEP) .distribution
  96.     $(RM) $@
  97.     $(CC) $(LDFLAGS) -o $(PROGRAM) $(OBJECTS) $(LDLIBS)
  98.     chmod +x $(PROGRAM)
  99.  
  100. .build:    newversion.aux
  101.     if ./newversion.aux -build; then mv -f newversion.h version.h; fi
  102.     @echo
  103.     @echo "      ***************************************************"
  104.     @echo "      *                            *"
  105.     @echo "      * Making Bash-`cat .distribution` for a $(MACHINE) running $(OS)."
  106.     @echo "      *                            *"
  107.     @echo "      ***************************************************"
  108.     @echo
  109.     @echo "$(PROGRAM) last made for a $(MACHINE) running $(OS)" >.machine
  110.  
  111. version.h:    newversion.aux
  112.     if ./newversion.aux -build; then mv -f newversion.h version.h; fi
  113.  
  114. y.tab.c:    parse.y shell.h
  115.         -if test -f y.tab.h; then mv -f y.tab.h old-y.tab.h; fi
  116.         $(BISON) -d parse.y
  117.         -if cmp -s old-y.tab.h y.tab.h; then mv old-y.tab.h y.tab.h; fi
  118.  
  119. version.o:    version.h version.c
  120.  
  121. shell.o:    shell.h flags.h shell.c posixstat.h filecntl.h endian.h
  122.         $(CC) $(CFG_FLAGS) $(CFLAGS) $(CPPFLAGS) -c shell.c
  123.  
  124. endian.h:    endian.aux
  125.         ./endian.aux endian.h
  126.  
  127. endian.aux:    endian.c
  128.         $(CC) $(CFLAGS) -o $@ endian.c
  129.         chmod +x endian.aux
  130.  
  131. variables.o: shell.h hash.h flags.h variables.h variables.c
  132.     $(CC) -c $(CFLAGS) $(CPPFLAGS) $(HOSTTYPE_DECL) variables.c
  133.  
  134. builtins/libbuiltins.a: $(BUILTIN_DEFS) $(BUILTIN_C_CODE)
  135.     build_builtins_in_dir ($(DEFDIR))
  136.  
  137. shell.h:    general.h variables.h config.h quit.h
  138. jobs.h:        endian.h quit.h
  139. variables.h:    hash.h
  140. braces.o: general.h
  141. copy_cmd.o: shell.h hash.h
  142. copy_cmd.o: general.h variables.h config.h quit.h
  143. dispose_cmd.o: shell.h
  144. dispose_cmd.o: general.h variables.h config.h quit.h
  145. execute_cmd.o: shell.h y.tab.h posixstat.h flags.h jobs.h
  146. execute_cmd.o: general.h variables.h config.h quit.h hash.h endian.h
  147. execute_cmd.o: unwind_prot.h
  148. expr.o: shell.h hash.h
  149. expr.o: general.h variables.h config.h quit.h
  150. flags.o: flags.h config.h general.h quit.h
  151. general.o: shell.h maxpath.h
  152. general.o: general.h variables.h config.h quit.h
  153. hash.o: shell.h hash.h
  154. hash.o: general.h variables.h config.h quit.h
  155. jobs.o: shell.h hash.h trap.h jobs.h
  156. jobs.o: general.h variables.h config.h endian.h quit.h
  157. mailcheck.o: posixstat.h maxpath.h variables.h
  158. mailcheck.o: hash.h quit.h
  159. make_cmd.o: shell.h flags.h
  160. make_cmd.o: general.h variables.h config.h quit.h
  161. y.tab.o: shell.h flags.h maxpath.h
  162. y.tab.o: general.h variables.h config.h quit.h
  163. print_cmd.o: shell.h y.tab.h
  164. print_cmd.o: general.h variables.h config.h quit.h
  165. shell.o: shell.h flags.h
  166. shell.o: general.h variables.h config.h quit.h
  167. subst.o: shell.h flags.h alias.h jobs.h
  168. subst.o: general.h variables.h config.h endian.h quit.h
  169. test.o: posixstat.h
  170. trap.o: trap.h shell.h hash.h unwind_prot.h
  171. trap.o: general.h variables.h config.h quit.h
  172. unwind_prot.o: config.h general.h unwind_prot.h
  173. bashline.o: shell.h hash.h builtins.h
  174. bashline.o: general.h variables.h config.h quit.h alias.h
  175.  
  176. .distribution:
  177.         ./newversion.aux -dist `$(PROGRAM) -c 'echo $$BASH_VERSION'`
  178.  
  179. newversion.aux:    newversion.c
  180.         $(CC) $(CFLAGS) $(CPPFLAGS) -o newversion.aux newversion.c
  181.         chmod +x newversion.aux
  182.  
  183. newversion:    newversion.aux
  184.         $(RM) .build
  185.         ./newversion.aux -dist
  186.         mv -f newversion.h version.h
  187.         $(MAKE) $(MFLAGS)
  188.